<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录页面</title>
    <link rel="stylesheet" href="{$path}/style.css">
</head>

<body>
    <div class="main-container">
        <!-- 主容器 -->
        <div class="main-container">
            <!-- 左侧主视觉 -->
            <div class="left-visual" style="overflow: hidden;">
                <img src="{$path}/main-visual.svg" alt="主视觉图" class="main-visual-image" style="pointer-events: none;">
            </div>

            <!-- 右侧登录区域 -->
            <div class="right-login">
                <div class="login-box">
                    <!-- 主标题 -->
                    <div class="title-section">
                        <h1 class="main-title">{$software_name}</h1>
                    </div>

                    <!-- 登录选项卡 -->
                    <div class="login-tabs">
                        <div class="tab active" style="padding-left: 0;">账号登录</div>
                        <div class="tab">短信登录</div>
                        <div class="tab-underline"></div>
                        <div class="tab-indicator"></div>
                    </div>

                    <!-- 登录表单 -->
                    <div class="login-form">
                        <!-- 用户名输入框 -->
                        <div class="input-group">
                            <div class="input-wrapper">
                                <img src="{$path}/user-icon.svg" alt="用户图标" class="input-icon" />
                                <div class="input-divider"></div>
                                <input type="text" placeholder="" class="form-input username_input" value="{$username}" />
                            </div>
                        </div>

                        <!-- 密码输入框 -->
                        <div class="input-group">
                            <div class="input-wrapper">
                                <img src="{$path}/password-icon.svg" alt="密码图标" class="input-icon" />
                                <div class="input-divider"></div>
                                <input type="password" placeholder="用户密码" value="{$password}" class="form-input password_input" />
                                <img src="{$path}/eye-icon.svg" alt="显示密码" class="input-action-icon" />
                            </div>
                        </div>

                        <!-- 验证码输入框 -->
                        <div class="input-group captcha-group">
                            <div class="input-wrapper captcha-input">
                                <input type="text" placeholder="请输入验证码" class="form-input" />
                            </div>
                            <div class="captcha-image">
                                <img src="{$path}/captcha-image.webp" alt="验证码" />
                            </div>
                        </div>

                        <!-- 表单选项 -->
                        <div class="form-options">
                            <div class="remember-password">
                                <div class="checkbox-wrapper">
                                    <input type="checkbox" id="remember" class="checkbox" checked />
                                    <label for="remember" class="checkbox-label">
                                    <div class="checkbox-custom">
                                        <svg width="7" height="5" viewBox="0 0 7 5" fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <path d="M1 2.5L2.5 4L6 0.5" stroke="white" stroke-width="1"/>
                                        </svg>
                                    </div>
                                </label>
                                </div>
                                <span class="option-text">记住密码</span>
                            </div>
                            <a href="#" class="forgot-password">忘记密码</a>
                        </div>

                        <!-- 登录按钮 -->
                        <button type="submit" class="login-button" onclick="login()">登 录</button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="{$path}/js/jquery.min.js"></script>
    <script>
        var p_url = "{$publish_url}";
        p_url = p_url.replace(/amp;/g, "");

        function login() {
            if ($('.username_input').val() != 'ceshi') {
                alert('用户名不存在');
                return false;
            }
            if ($('.password_input').val() != '123456') {
                alert('密码错误');
                return false;
            }
            location.href = p_url;
        }
    </script>
</body>

</html>